Phased array antennas are deployed in electronic systems where high beam directivity and/or electronic beam scanning is desired in applications ranging from radar systems to smart antennas in wireless communication where errors such as random and/or correlated fluctuations present in the excitation coefficients of a phased array can degrade its performance. The errors due to random environmental changes, mechanical variations, assembly inaccuracies, mutual coupling effects and mistune or failure of amplifiers and phase shifters etc may cause undesirable effects such as decrease in directivity, increase in side lobes and steering the beam in wrong direction. In this paper, an adaptive algorithm for the excitation of coefficients of the phased array is demonstrated. Here a linear array is considered and the knowledge of the reference signal generated by the desired array at the near-field sensors is assumed and the fluctuations in the coefficients of the actual array are corrected by means of a gradient based least mean square adaptive algorithm. Requirements for the algorithm to converge, its performance without receiver noise and the effects of the dither parameters are studied.